import request from '~/utils/request';

//获取商家选择组件用列表
export function getMerchantSelectList() {
    return request({
        url: '/Merchant/GetMerchantSelectList',
        method: 'get',
    });
}

//获取商家部门选择组件用列表
export function getMerchantDeptList() {
    return request({
        url: '/Merchant/GetDeptSelectList',
        method: 'get',
    });
}

//获取商员工选择组件用列表
export function getStaffSelectList(id) {
    return request({
        url: '/Merchant/GetStaffSelectList?merchant_id=' + id,
        method: 'get',
    });
}

//商家列表
export function getMerchantList(data) {
    return request({
        url: '/Merchant/GetMerchantList',
        method: 'post',
        data,
    });
}

//商家单条记录
export function getMerchantInfo(data) {
    return request({
        url: '/Merchant/GetMerchantInfo?merchantid=' + data,
        method: 'get',
        data,
    });
}

//商家保存
export function saveMerchantInfo(data) {
    return request({
        url: '/Merchant/SaveMerchantInfo',
        method: 'post',
        data,
    });
}

//设置商家状态
export function setMerchantState(data) {
    return request({
        url: '/Merchant/SetMerchantState',
        method: 'post',
        data,
    });
}

//商家资产调整
export function modifyMerchantBalance(data) {
    return request({
        url: '/Merchant/ModifyMerchantBalance',
        method: 'post',
        data,
    });
}

//部门树形
export function getDeptTree(data) {
    return request({
        url: '/Merchant/GetDeptTree',
        method: 'get',
        data,
    });
}

//部门列表
export function getDeptList(data) {
    return request({
        url: '/Merchant/GetDeptList',
        method: 'post',
        data,
    });
}

//部门设置状态
export function setDeptState(data) {
    return request({
        url: '/Merchant/SetDeptState',
        method: 'post',
        data,
    });
}

//部门保存
export function saveDeptInfo(data) {
    return request({
        url: '/Merchant/SaveDeptInfo',
        method: 'post',
        data,
    });
}

//部门取单条记录
export function getDeptInfo(data) {
    return request({
        url: '/Merchant/GetDeptInfo?deptid=' + data,
        method: 'get',
        data,
    });
}

//商家员工列表
export function getStaffListUser(data) {
    return request({
        url: '/Merchant/GetStaffListUser',
        method: 'post',
        data,
    });
}

//商家员工保存
export function saveStaffInfo(data) {
    return request({
        url: '/Merchant/SaveStaffInfo',
        method: 'post',
        data,
    });
}

//商家员工信息
export function getStaffInfo(staffid) {
    return request({
        url: '/Merchant/GetStaffInfo?staffid=' + staffid,
        method: 'get',
    });
}

//商家员工信息
export function setStaffSendAuth(data) {
    return request({
        url: '/Merchant/SetStaffSendAuth?',
        method: 'post',
        data,
    });
}

//厂家分页列表
export function getFactoryList(data) {
    return request({
        url: '/Merchant/GetFactoryList',
        method: 'post',
        data,
    });
}

//厂家单条记录
export function getFactoryInfo(data) {
    return request({
        url: '/Merchant/GetFactoryInfo',
        method: 'post',
        data,
    });
}

//保存厂家记录
export function saveFactoryInfo(data) {
    return request({
        url: '/Merchant/SaveFactoryInfo',
        method: 'post',
        data,
    });
}

//厂家附件列表
export function getFactoryFile(data) {
    return request({
        url: '/Merchant/GetFactoryFile',
        method: 'post',
        data,
    });
}

//保存厂家附件
export function saveFactoryFile(data) {
    return request({
        url: '/Merchant/SaveFactoryFile',
        method: 'post',
        data,
    });
}

//设置厂家状态
export function setFactoryState(data) {
    return request({
        url: '/Merchant/SetFactoryState',
        method: 'post',
        data,
    });
}

//获取厂家选择组件用列表
export function getFactorySelectList() {
    return request({
        url: '/Merchant/GetFactorySelectList',
        method: 'get',
    });
}

//修改厂家用户
export function SaveFactoryStaffID(data) {
    return request({
        url: '/Merchant/SaveFactoryStaffID',
        method: 'post',
        data,
    });
}
//获取商家下面的所有厂家
export function GetFactoryListByMerchantId(data) {
    return request({
        url: '/Merchant/GetFactoryListByMerchantId',
        method: 'post',
        data,
    });
}

//获取商家入驻申请列表
export function getMerchantApplyList(data) {
    return request({
        url: '/Merchant/GetMerchantApplyList',
        method: 'post',
        data,
    });
}

//商家入驻申请
export function saveMerchantApplyInfo(data) {
    return request({
        url: '/Merchant/SaveMerchantApplyInfo',
        method: 'post',
        data,
    });
}

//设置商家入驻申请状态
export function setMerchantApplyState(data) {
    return request({
        url: '/Merchant/SetMerchantApplyState',
        method: 'post',
        data,
    });
}
